
<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/Poorstatistics/poorstatistics?params=1" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="poorstatistics" />
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel" />

            <label >日期：</label>&nbsp;
            <input type="text" name="startTime"  value="${startTime}" data-rule="required" data-pattern="yyyy-MM-dd" data-toggle="datepicker" placeholder="FROM">
            <input type="text" name="endTime"  value="${endTime}" data-rule="required" data-pattern="yyyy-MM-dd" data-toggle="datepicker" placeholder="TO">&nbsp;&nbsp;
            <label>分类：</label>
            <g:select name="name" from="${typeList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="name" optionValue="name" value="${name}" noSelection="['':'ALL']"    />&nbsp;


            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm','${request.getContextPath()}/Cpk/exportExcel')" data-icon="file-excel-o" title="导出Excel">导出</button>&nbsp;
        </div>
    </form>
</div>

<div class="bjui-pageContent">
    <g:if test="${poorstatistics.size() > 0}">
        <table id="lapEndByBatch" data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr id="t1">
                <g:each in="${tableHeadList}" status="j" var="headInstance">
                    <g:if test="${headInstance!='RN'}">
                        <th  width="80"><g:message code="${headInstance}" default="${headInstance}"/></th>
                    </g:if>
                </g:each>
            </tr>
            </thead>
            <tbody>
            <g:if test="${poorstatistics.size()>0}">
                <g:each in="${poorstatistics}" status="i" var="dataInstance">
                    <g:each in="${tableHeadList}" status="j" var="headInstance">
                        <g:if test="${headInstance=='PV数量'|| headInstance=='PV不良比率'}">
                            <td name="step${i}"><a href="${request.getContextPath()}/Poorstatistics/poorstatistics1?startTime=<%=params.startTime%>
                                &endTime=<%=params.endTime%>&name=<%=params.name%>"
                                                   data-toggle="navtab" data-id="dialog-normal"
                                                   data-options="{id:'poorstatistics1', title:'不良统计二级界面'}">
                                ${dataInstance["${headInstance}"] }
                            </a></td>
                        </g:if>
                        <g:elseif test="${headInstance!='RN'}">
                            <td>${dataInstance["${headInstance}"] }</td>
                        </g:elseif>

                    %{--<g:if test="${headInstance!='RN'}">
                        <td> <a href="${request.getContextPath()}/Poorstatistics/poorstatistics1?startTime=<%=params.startTime%>
                        &endTime=<%=params.endTime%>"
                        data-toggle="navtab" data-id="dialog-normal"
                        data-options="{id:'poorstatistics1', title:'不良统计二级界面'}">
                            ${dataInstance["${headInstance}"] }
                        </a></td>
                    </g:if>--}%
                    </g:each>
                    </tr>
                </g:each>
            </g:if>
            <g:else>
                <g:render template="../template/emptyPanel" />
            </g:else>
            </tbody>
        </table>
    </g:if>
</div>
